<!DOCTYPE html>
<html>
<head>
  <div  th:replace="common/header.html"></div>


</head>
<body th:class="${application.sidebarCollapse}">
<div th:replace="common/chart.html"></div>

<div class="wrapper">

  <div th:replace="common/navbar.html"></div>

  <div th:replace="common/aside.html"></div>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" style="font-size:0.90rem">

        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">

                        <h5 class="m-0 text-dark">
                           <span  th:text="${systemInfo.hostname}"></span>
                            <th:block th:if="${systemInfo.remark ne '' && systemInfo.remark ne null}">
                                ，备注：<span th:text="${systemInfo.remark}"></span>
                            </th:block>
                            ，<small class="badge badge-danger" title="更新时间"><i class="far fa-clock" ></i> <span th:text="${#dates.format(systemInfo.createTime,'yyyy-MM-dd HH:mm:ss')}">10 Feb. 2014</span></small>
                        </h5>

                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="javascript:history.back()">返回</a></li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">

            <div class="row">
                <div class="col-12">

                    <div class="callout callout-info">
                        <h6><i class="fas fa-info"></i> <strong>系统信息</strong>:</h6>
                        <div><strong>系统描述：</strong><span th:text="${systemInfo.platForm}"></span>，<strong>版本：</strong><span th:text="${systemInfo.platformVersion}"></span>，<strong>cpu核数：</strong><span th:text="${systemInfo.cpuCoreNum}"></span>
                            ，<strong>cpu型号：</strong><span th:text="${systemInfo.cpuXh}"></span> ，<strong>运行进程数量：</strong><span th:text="${systemInfo.procs}"></span>，<strong>总内存：</strong><span th:text="${systemInfo.totalMem}"></span>
                            ，<strong>启动时间：</strong><span th:text="${systemInfo.bootTimeStr}"></span>，<strong>运行时间：</strong><span th:text="${systemInfo.uptimeStr}"></span>
                            ，<strong>累计接收流量：</strong><span th:text="${systemInfo.bytesRecv}+'G'"></span>，<strong>累计发送流量：</strong><span th:text="${systemInfo.bytesSent}+'G'"></span>
                            ，<strong>agent版本：</strong><span th:text="${systemInfo.agentVer}"></span>，<strong>agent上报时间(秒)：</strong><span th:text="${systemInfo.submitSeconds}"></span></div>
                    </div>
                </div></div>

            <div th:replace="common/cpuTemperatures.html"></div>

            <!-- Info boxes -->
            <div class="row">
                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box">
                        <span class="info-box-icon bg-info elevation-1"><i class="fas fa-cog"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">当前CPU使用率</span>
                            <span class="info-box-number"><span th:text="${systemInfo.cpuPer}">10</span><small>%</small>
                </span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <!-- /.col -->
                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box mb-3">
                        <span class="info-box-icon bg-danger elevation-1"><i class="far fa-star"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">当前内存使用率</span>
                            <span class="info-box-number"><span th:text="${systemInfo.memPer}">41,410</span><small>%</small></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <!-- /.col -->

                <!-- fix for small devices only -->
                <div class="clearfix hidden-md-up"></div>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box mb-3">
                        <span class="info-box-icon bg-success elevation-1"><i class="far fa-copy"></i></span>
                        <div class="info-box-content">
                            <span class="info-box-text">监控进程</span>
                            <span class="info-box-number"  title="已下线/总数量"><font color="#FF4500"  th:text="${downAppSize}">0</font>/<span th:text="${totalAppSize}"></span></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <!-- /.col -->
                <div class="col-12 col-sm-6 col-md-3">
                    <div class="info-box mb-3">
                        <span class="info-box-icon bg-warning elevation-1"><i class="far fa-bookmark"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">监控DOCKER</span>
                            <span class="info-box-number" title="已下线/总数量"><font color="#FF4500"  th:text="${downDockerSize}">0</font>/<span th:text="${totalDockerSize}"></span></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-8">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>系统指标</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <table class="table m-0 table-striped">
                                    <thead>
                                    <tr>
                                        <th>指标</th>
                                        <th>当前值</th>
                                        <th>历史最高</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>系统负载1分钟</td>
                                        <td><span class="badge badge-success"  th:text="${sysLoadState.oneLoad}">Shipped</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxOneLoad}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>系统负载5分钟</td>
                                        <td><span class="badge badge-success" th:text="${sysLoadState.fiveLoad}">Pending</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxFiveLoad}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>系统负载15分钟</td>
                                        <td><span class="badge badge-success"  th:text="${sysLoadState.fifteenLoad}">Delivered</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxFifteenLoad}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>网络接收，KB/秒</td>
                                        <td><span class="badge badge-info" th:text="${netIoState.rxbyt}">Processing</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxRxbyt}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>网络发送，KB/秒</td>
                                        <td><span class="badge badge-info" th:text="${netIoState.txbyt}">Pending</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxTxbyt}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>网络接收，包数/秒</td>
                                        <td><span class="badge badge-info" th:text="${netIoState.rxpck}">Delivered</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxRxpck}">Shipped</span></td>
                                    </tr>
                                    <tr>
                                        <td>网络发送，包数/秒</td>
                                        <td><span class="badge badge-info" th:text="${netIoState.txpck}">Shipped</span></td>
                                        <td><span class="badge badge-danger"  th:text="${maxTxpck}">Shipped</span></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->
                        <div class="card-footer clearfix">
                            <button type="button"  th:onclick="viewChart([[${systemInfo.id}]])"  class="btn btn-sm btn-info float-left">查看图表</button>
                        </div>
                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

                <div class="col-md-4">
                    <!-- Info Boxes Style 2 -->
                    <div class="info-box mb-3 bg-warning">
                        <span class="info-box-icon"><i class="fas fa-tag"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">最近<span th:text="${historyDataOut}"></span>天cpu使用率最高</span>
                            <span class="info-box-number"><span  th:text="${maxCpuState}"></span><small>%</small></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                    <div class="info-box mb-3 bg-success">
                        <span class="info-box-icon"><i class="far fa-heart"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">最近<span th:text="${historyDataOut}"></span>天内存使用率最高</span>
                            <span class="info-box-number" ><span th:text="${maxMemState}">92,050</span><small>%</small></span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                    <div class="info-box mb-3 bg-danger">
                        <span class="info-box-icon"><i class="fas fa-cloud-download-alt"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">最近<span th:text="${historyDataOut}"></span>天下线次数</span>
                            <span class="info-box-number"  th:text="${hostDownSize}">114,381</span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->
                    <div class="info-box mb-3 bg-info">
                        <span class="info-box-icon"><i class="far fa-comment"></i></span>

                        <div class="info-box-content">
                            <span class="info-box-text">上报数据频率(秒)</span>
                            <span class="info-box-number" th:text="${systemInfo.submitSeconds}">163,921</span>
                        </div>
                        <!-- /.info-box-content -->
                    </div>
                    <!-- /.info-box -->


                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>磁盘空间信息</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <div th:replace="common/desk.html"></div>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>磁盘IO信息</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <div th:replace="common/deskio.html"></div>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->

            <div th:if="${not #lists.isEmpty(diskSmartList)}">
            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>磁盘SMART信息</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <div th:replace="common/disksmart.html"></div>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->
            </div>

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>进程列表</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <table class="table m-0 table-striped">
                                    <thead>
                                    <tr>
                                        <th style="width: 80px">序号</th>
                                        <th>进程名称</th>
                                        <th>内存使用率%</th>
                                        <th>CPU使用率%</th>
                                        <th title="readBytes">读取</th>
                                        <th title="writeBytes">写入</th>
                                        <th>监控状态</th>
                                        <th>更新时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <th:block th:each="item,iterStat : ${appInfoList}">
                                        <tr>
                                            <td th:text="${iterStat.index+1}">1</td>
                                                <th:block th:if="${item.state  == '2'}">
                                                    <td title="超过5分钟未上报状态，可能已下线"  ><span class="badge bg-danger"  th:text="${item.appName}"></span>
                                                </th:block>
                                                <th:block th:if="${item.state  != '2'}">
                                                    <td><span   th:text="${item.appName}"></span>
                                                </th:block>
                                            </td>
                                            <td>
                                                <th:block th:if="${item.memPer >= 90}">
                                                    <span class="badge bg-danger" th:text="${item.memPer}"></span>
                                                </th:block>
                                                <th:block th:if="${item.memPer < 90 && item.memPer >= 70  }">
                                                    <span class="badge bg-warning" th:text="${item.memPer}"></span>
                                                </th:block>
                                                <th:block th:if="${item.memPer < 70  }">
                                                    <span class="badge bg-primary" th:text="${item.memPer}"></span>
                                                </th:block>
                                            </td>
                                            <td>
                                                <th:block th:if="${item.cpuPer >= 90}">
                                                    <span class="badge bg-danger" th:text="${item.cpuPer}"></span>
                                                </th:block>
                                                <th:block th:if="${item.cpuPer < 90 && item.cpuPer >= 70  }">
                                                    <span class="badge bg-warning" th:text="${item.cpuPer}"></span>
                                                </th:block>
                                                <th:block th:if="${item.cpuPer < 70  }">
                                                    <span class="badge bg-primary" th:text="${item.cpuPer}"></span>
                                                </th:block>
                                            </td>
                                            <td th:text="${item.readBytes}"></td>
                                            <td th:text="${item.writesBytes}"></td>
                                            <td>
                                                <th:block th:if="${item.active  == '1'}">
                                                    <span class="badge bg-primary">监控中</span>
                                                </th:block>
                                                <th:block th:if="${item.active  != '1'}">
                                                    <span class="badge bg-danger">已停止</span>
                                                </th:block>
                                            </td>
                                            <td th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}">Update software</td>
                                            <td>
                                                <button type="button"  th:onclick="viewAppInfo([[${item.id}]])"  class="btn bg-gradient-primary btn-sm">图表</button></td>
                                        </tr>
                                    </th:block>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>端口监控列表</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <table class="table m-0 table-striped">
                                    <thead>
                                    <tr>
                                        <th style="width: 80px">序号</th>
                                        <th>端口</th>
                                        <th>别名</th>
                                        <th>端口状态</th>
                                        <th>监控状态</th>
                                        <th>更新时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <th:block th:each="item,iterStat : ${portInfoList}">
                                        <tr>
                                            <td th:text="${iterStat.index+1}">1</td>
                                            <td>
                                                <span class="badge bg-primary" th:text="${item.port}"></span>
                                            </td>
                                            <td th:text="${item.portName}">Update software</td>
                                            <td>
                                                <th:block th:if="${item.state  == '2'}">
                                                    <span class="badge bg-danger">失败</span>
                                                </th:block>
                                                <th:block th:if="${item.state  != '2'}">
                                                    <span  class="badge bg-primary">正常</span>
                                                </th:block>
                                            </td>
                                            <td>
                                                <th:block th:if="${item.active  == '1'}">
                                                    <span class="badge bg-primary">监控中</span>
                                                </th:block>
                                                <th:block th:if="${item.active  == '2'}">
                                                    <span class="badge bg-danger">已停止</span>
                                                </th:block>
                                            </td>
                                            <td th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}">Update software</td>
                                        </tr>
                                    </th:block>

                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>日志监控列表</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <table class="table m-0 table-striped">
                                    <thead>
                                    <tr>
                                        <th style="width: 80px">序号</th>
                                        <th>日志文件</th>
                                        <th>告警记录</th>
                                        <th>监控状态</th>
                                        <th>更新时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <th:block th:each="item,iterStat : ${fileWarnInfoList}">
                                        <tr>
                                            <td th:text="${iterStat.index+1}">1</td>
                                            <td th:text="${item.filePath}">Update software</td>
                                            <td th:onclick="stateList([[${item.id}]])" title="点击查看告警记录" style="cursor: pointer"><span class="badge bg-danger" th:text="${item.warnDatas}"></span></td>
                                            <td>
                                                <th:block th:if="${item.active  == '1'}">
                                                    <span class="badge bg-primary">监控中</span>
                                                </th:block>
                                                <th:block th:if="${item.active  != '1'}">
                                                    <span class="badge bg-danger">已停止</span>
                                                </th:block>
                                            </td>
                                            <td th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}">Update software</td>
                                            <td>
                                                <button type="button"  th:onclick="viewFileWarnInfo([[${item.id}]])"  class="btn bg-gradient-primary btn-sm">查看</button>
                                            </td>
                                        </tr>
                                    </th:block>

                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->

            <!-- Main row -->
            <div class="row">
                <!-- Left col -->
                <div class="col-md-12">
                    <!-- MAP & BOX PANE -->
                    <!-- TABLE: LATEST ORDERS -->
                    <div class="card">
                        <div class="card-header border-transparent">
                            <h3 class="card-title"><strong>DOCKER列表</strong></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body p-0">
                            <div class="table-responsive">
                                <table class="table m-0 table-striped">
                                    <thead>
                                    <tr>
                                        <th style="width: 80px">序号</th>
                                        <th>DOCKER别名</th>
                                        <th>内存使用M</th>
                                        <th>CPU系统时间</th>
                                        <th>CPU用户时间</th>
                                        <th>监控状态</th>
                                        <th>更新时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <th:block th:each="item,iterStat : ${dockerInfoList}">
                                        <tr>
                                            <td th:text="${iterStat.index+1}">1</td>
                                                <th:block th:if="${item.state  == '2'}">
                                                    <td title="超过5分钟未上报状态，可能已下线" ><span  class="badge bg-danger"  th:text="${item.dockerName}"></span>
                                                </th:block>
                                                <th:block th:if="${item.state  != '2'}">
                                                    <td><span   th:text="${item.dockerName}"></span>
                                                </th:block>
                                            </td>
                                            <td th:text="${item.memPer}">Update software</td>
                                            <td>
                                                <span class="badge bg-primary" th:text="${item.systemTime}"></span>
                                            </td>
                                            <td>
                                                <span class="badge bg-primary" th:text="${item.userTime}"></span>
                                            </td>
                                            <td>
                                                <th:block th:if="${item.active  == '1'}">
                                                    <span class="badge bg-primary">监控中</span>
                                                </th:block>
                                                <th:block th:if="${item.active  != '1'}">
                                                    <span class="badge bg-danger">已停止</span>
                                                </th:block>
                                            </td>
                                            <td th:text="${#dates.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}">Update software</td>
                                            <td>
                                                <button type="button"  th:onclick="viewDocker([[${item.id}]])"  class="btn bg-gradient-primary btn-sm">图表</button></td>
                                        </tr>
                                    </th:block>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.card-body -->

                        <!-- /.card-footer -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->

            </div>
            <!-- /.row -->


        </div><!--/. container-fluid -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->

  <div th:replace="common/footer.html"></div>
    <script th:src="@{'/static/js/jQuery/jquery.form.min.js'}" type="text/javascript" charset="utf-8"></script>

</div>
<!-- ./wrapper -->

<script th:src="@{'/static/js/draw.js'}"></script>

</body>
</html>
